package com.example.administrator.printoutindemo.mvp.ui.entity;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class GetOutstorageCheckWaitingApproveEntity implements Serializable {

    private String batchId;
    private String projectName;
    private String checkStatus;
    private String proid;
    private String applyDateTime;
    private String checkDateTime;
    private String receiveUserName;
    private String recievePhone;
    private String orderNo;
    private String storeName;
    private String applyUserName;
    private String transportmode;

    public String getTransportmode() {
        return transportmode == null ? "" : transportmode;
    }

    public void setTransportmode(String transportmode) {
        this.transportmode = transportmode == null ? "" : transportmode;
    }

    // 将JSON对象转化为list
    public List<GetOutstorageCheckWaitingApproveEntity> getListFromJSON(String JsonStr) {
        List<GetOutstorageCheckWaitingApproveEntity> clist = new ArrayList<GetOutstorageCheckWaitingApproveEntity>();

        try {

            JSONArray jay = new JSONArray(JsonStr);// 将字符串转化为JSON数组

            for (int i = 0; i < jay.length(); i++) {
                JSONObject temp = (JSONObject) jay.get(i);

                GetOutstorageCheckWaitingApproveEntity n = new GetOutstorageCheckWaitingApproveEntity();

                n.setBatchId(temp.getString("batchId"));
                n.setProjectName(temp.getString("projectName"));
                n.setCheckStatus(temp.getString("checkStatus"));
                n.setProid(temp.getString("proid"));
                n.setApplyDateTime(temp.getString("applyDateTime"));
                n.setCheckDateTime(temp.getString("checkDateTime"));
                n.setReceiveUserName(temp.getString("receiveUserName"));
                n.setRecievePhone(temp.getString("recievePhone"));
                n.setOrderNo(temp.getString("orderNo"));
                n.setStoreName(temp.getString("storeName"));
                n.setApplyUserName(temp.getString("applyUserName"));
                n.setTransportmode(temp.getString("transportmode"));
                clist.add(n);

            }

        } catch (Exception e) {
            e.printStackTrace();
        }

        return clist;

    }

    public String getBatchId() {
        return batchId;
    }

    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus;
    }

    public String getProid() {
        return proid;
    }

    public void setProid(String proid) {
        this.proid = proid;
    }

    public String getApplyDateTime() {
        return applyDateTime;
    }

    public void setApplyDateTime(String applyDateTime) {
        this.applyDateTime = applyDateTime;
    }

    public String getCheckDateTime() {
        return checkDateTime;
    }

    public void setCheckDateTime(String checkDateTime) {
        this.checkDateTime = checkDateTime;
    }

    public String getReceiveUserName() {
        return receiveUserName;
    }

    public void setReceiveUserName(String receiveUserName) {
        this.receiveUserName = receiveUserName;
    }

    public String getRecievePhone() {
        return recievePhone;
    }

    public void setRecievePhone(String recievePhone) {
        this.recievePhone = recievePhone;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getApplyUserName() {
        return applyUserName;
    }

    public void setApplyUserName(String applyUserName) {
        this.applyUserName = applyUserName;
    }
}